package com.wd.mylibrary_base.utils

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query

/**
 * 作者: 邢凌志
 * 时间: 2024/9/24
 * 描述:
 */
@Dao
interface RoomDao {
    //添加方法
    @Insert
    fun add(room:RoomBean)

    //全查
    @Query("select * from RoomBean")
    fun queryAll():List<RoomBean>

    //删除所有
    @Query("delete from RoomBean")
    fun deleteAll()

    //根据Id删除
    @Query("delete from RoomBean where content=:key")
    fun deleteById(key :String)
}